package com.dowsure.apisaas.enums;

/**
 * @description: Dowsure支持的平台code
 * @author: Dowsure
 * @create: 2022-02-15 10:15
 **/
public enum PlatformCodeEnums {

    AMAZON("AMAZON", "amazon"),
    EBAY("EBAY", "ebay"),
    SHOPEE("SHOPEE", "shopee")
    ;

    private String value;

    private String describe;

    PlatformCodeEnums(String value, String describe){
        this.value = value;
        this.describe = describe;
    }

    public String getValue() {
        return value;
    }

    @Override
    public String toString() {
        return String.valueOf(value);
    }

    public static PlatformCodeEnums fromValue(String text) {
        for (PlatformCodeEnums b : PlatformCodeEnums.values()) {
            if (String.valueOf(b.value).equals(text)) {
                return b;
            }
        }
        return null;
    }
}
